import request from '@/utils/request'

export function SequenceAdjustmentGetList(data) {
  return request({
    url: '/api/v1/ReportManage/SequenceAdjustmentGetList',
    method: 'get',
    params: data
  })
}

export function UpdateSequenceAdjustment(data) {
  return request({
    url: '/api/v1/ReportManage/UpdateSequenceAdjustment',
    method: 'post',
    data
  })
}

export function ReportSeal(data) {
  return request({
    url: '/api/v1/ReportManage/ReportSeal',
    method: 'post',
    data
  })
}

export function GetOilsReportNumber(data) {
  return request({
    url: '/api/v1/ReportManage/GetOilsReportNumber',
    method: 'get',
    params: data
  })
}

export function getListNoPage(data) {
  return request({
    url: '/api/v1/SysBusinessReportTemplate/GetListNoPage',
    method: 'get',
    params: data
  })
}

export function GenerateReportCDC(data) {
  return request({
    url: '/api/v1/ReportCDC/GenerateReportCDC',
    method: 'post',
    data
  })
}

export function create(data) {
  return request({
    url: '/api/v1/ReportManage/Create',
    method: 'post',
    data
  })
}

export function deleteRecord(data) {
  return request({
    url: '/api/v1/ReportManage/Delete',
    method: 'delete',
    data
  })
}

export function UpdateReportData(data) {
  return request({
    url: '/api/v1/ReportManage/UpdateReportData',
    method: 'patch',
    data
  })
}

export function update(data) {
  return request({
    url: '/api/v1/ReportManage/Update',
    method: 'post',
    data
  })
}

export function getList(data, pagination) {
  if (pagination) {
    data["pageIndex"] = pagination.pageIndex;
    data["pageSize"] = pagination.pageSize;
  }
  return request({
    url: '/api/v1/ReportManage/GetList',
    method: 'get',
    params: data
  })
}

export function ReportVerify(data) {
  return request({
    url: '/api/v1/ReportManage/ReportVerify',
    method: 'post',
    data
  })
}

export function ReportVerifyReject(data) {
  return request({
    url: '/api/v1/ReportManage/ReportVerifyReject',
    method: 'post',
    data
  })
}

// 下载导出文件的压缩包
// export const DownloadReportZip = data => request.post('/api/v1/ReportManage/DownloadReportZip', { data: data, responseType: 'blob' });

export function DownloadReportZip(data) {
  return request({
    url: '/api/v1/ReportManage/DownloadReportZip',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
export function DownloadReportFile(data) {
  return request({
    url: '/api/v1/ReportManage/DownloadReportFile',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function ReportVerifyPass(data) {
  return request({
    url: '/api/v1/ReportManage/ReportVerifyPass',
    method: 'post',
    data
  })
}

export function exportWithdrawal(data) {
  return request({
    url: '/api/v1/ReportManage/ReportWithDrawal',
    method: 'post',
    data
  })
}
export function getVerifyList(data, pagination) {
  if (pagination) {
    data["pageIndex"] = pagination.pageIndex;
    data["pageSize"] = pagination.pageSize;
  }
  return request({
    url: '/api/v1/ReportManage/GetVerifyList',
    method: 'get',
    params: data
  })
}

// 查询报告信息
export const Get = params => request('/api/v1/ReportManage/Get', { params: params });

